/*
 * --------------------------------------------------------------
 * Copyright ©  2015 Hangzhou DtDream Technologies Co.,Ltd.
 * --------------------------------------------------------------
 *      Product: 协同数治
 *  Module Name: design
 * Date Created: 2023/2/27
 *  Description: TODO
 * --------------------------------------------------------------
 * Modification History
 * DATE            NAME            Description
 * --------------------------------------------------------------
 * 2023/2/27       yewj            TODO
 * --------------------------------------------------------------
 */

package com.dtdream.pattern.observe.improve;

/**
 * TODO
 *
 * @Author: yewj
 **/
public class CurrentConditions implements Observer {

    private float temperature;
    private float pressure;
    private float humidity;

    @Override
    public void update(float temperature, float pressure, float humidity) {
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    public void display() {
        System.out.println("*****today mTemperature:" + temperature + "****");
        System.out.println("*****today mPressure:" + pressure + "****");
        System.out.println("*****today mHumidity:" + humidity + "****");
    }

}
